﻿using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using VXCompany.SilverlightLogging.ServiceProxy;

namespace VXCompany.SilverlightLogging.MVVM.Models.Stores
{
	public interface IStore : ICollection<ExceptionMessage>, INotifyCollectionChanged, INotifyPropertyChanged
	{
		/// <summary>
		/// Gets human readable name for Store.
		/// </summary>
		string Name { get; }

		/// <summary>
		/// Indicates whether Store is available.
		/// </summary>
		bool IsStorageAvailable { get; }

		/// <summary>
		/// Returns errors with ErrorLevel greater or equal to provided minLevel.
		/// </summary>
		/// <param name="minLevel">Minimum error level.</param>
		/// <returns>Returns errors with ErrorLevel greater or equal to provided minLevel.</returns>
		IEnumerable<ExceptionMessage> GetByMinLevel(ServiceProxy.ErrorLevel minLevel);
		
		/// <summary>
		/// Removes provided messages from the Store, by MessageID.
		/// </summary>
		/// <param name="messages"></param>
		void RemoveRange(IEnumerable<ExceptionMessage> messages);
	}
}
